package com.myblog.mapper;

import com.myblog.model.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TagMapper {

    void insertTag(Tag tag);

    Tag selectByTagName(String newArticleTag);

    @Select("select count(*) from tags")
    Integer selectNumOfTags();

    @Select("select* from tags order by id desc")
    List<Tag> selectAllTags();
}
